Reads in the number of pollen and nectar curves. Either we have one pair for each tov or we need a look-up table, but because many have the same curves a look up table was used. This however requires another input file for tov types to pollen/nectar curve number. If not using pollen and nectar then this is waste of space, so there is a cfg to turn it off and set all curves to a zero curve.
There are two sets of data structures - some based on tole types and the rest are crops that can be on a field tole. the methods of input is duplicated as far as possible.
424 vector<double> empty;
426 for (
int i = 0; i < 366; i++) {
427 empty.push_back(0.0);
449 ifstream infile(a_tovinputfile.c_str(), ios::in);
451 if (!infile.is_open()) {
452 g_msg->
Warn(
"PollenNectarDevelopmentData::PollenNectarDevelopmentData Cannot open the file", a_toleinputfile.c_str());
458 for (
int i = 0; i < no_curves-1; i++)
460 infile >> tov >> curvenum;
470 vector<double> slopes(366, 0);
475 for (
int i = 0; i < no_curves; i++)
479 infile >> slopes[365];
481 for (
int d = 0; d < 365; d++) infile >> slopes[d];
485 infile >> slopes[365];
486 for (
int d = 0; d < 365; d++) infile >> slopes[d];
500 infile.open(a_tovinputfile.c_str(), ios::in);
502 if (!infile.is_open()) {
503 g_msg->
Warn(
"PollenNectarDevelopmentData::PollenNectarDevelopmentData Cannot open the file", a_toleinputfile.c_str());
507 int tole, tolecurvenum;
508 for (
int i = 0; i < no_curves-1; i++)
510 infile >> tole >> tolecurvenum;
522 for (
int i = 1; i <= no_curves; i++)
525 infile >> tolecurvenum;
527 infile >> slopes[366];
528 for (
int d = 0; d < 365; d++) infile >> slopes[d];
532 infile >> slopes[365];
533 for (
int d = 0; d < 365; d++) infile >> slopes[d];
bool value(void)
Definition: configurator.h:135
TTypesOfVegetation TranslateVegTypes(int VegReference)
Definition: landscape.h:1655
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: maperrormsg.cpp:59
A standard class to contain a pollen or nectar curve based on indexed rates.
Definition: plants.h:184
vector< int > m_tole_pollencurvetable
Definition: plants.h:243
vector< PollenNectarDevelopmentCurve * > m_tovPollenCurves
Definition: plants.h:238
vector< PollenNectarDevelopmentCurve * > m_toleNectarCurves
Definition: plants.h:241
vector< PollenNectarDevelopmentCurve * > m_tovNectarCurves
Definition: plants.h:239
vector< PollenNectarDevelopmentCurve * > m_tolePollenCurves
Definition: plants.h:240
vector< int > m_tov_pollencurvetable
Definition: plants.h:242
class MapErrorMsg * g_msg
This pointer provides access the to the internal ALMaSS error message system.
Definition: maperrormsg.cpp:41
CfgBool cfg_pollen_nectar_on
@ tole_Foobar
Definition: tole_declaration.h:111
@ tov_Undefined
Definition: tov_declaration.h:114